import request from '@/utils/request'

// 查询文件存储列表
export function listFile(query) {
  return request({
    url: '/tool/file/list',
    method: 'get',
    params: query
  })
}


// 删除文件存储
export function delFile(fileId) {
  return request({
    url: '/tool/file/' + fileId,
    method: 'delete'
  })
}

//  根据路径删除文件
export function remove(path) {
  return request({
    url: 'tool/file/delFile?path='+path,
    method: 'delete'
  })
}


// 导出文件存储
export function exportFile(query) {
  return request({
    url: '/tool/file/export',
    method: 'get',
    params: query
  })
}

export function sync() {
  return request({
    url: '/tool/file/synchronize',
    method: 'post'
  })
}
